<template>
  <app-page>

    <z-paging ref="paging" @query="queryList">
      <template #top>
        <app-navbar title="设备" :show-left="false" bg="var(--color-white)"></app-navbar>
        <title-row></title-row>
        <filter-row></filter-row>
      </template>
    </z-paging>
    <app-tabbar-default :border="false" active="/pages/facility/index"></app-tabbar-default>
  </app-page>
</template>

<script lang="ts" setup>
import type { ZPaging } from "z-paging/types/comps/z-paging";
import FilterRow from "./components/filterRow.vue";
import TitleRow from "./components/titleRow.vue";
import LoadingManager from "@/utils/loading.ts";

const paging = ref();
function queryList(pageNo: number, pageSize: number, from: ZPagingEnums.QueryFrom) {
  if (from !== "load-more") {
    LoadingManager.show();
  }
  const _params = {
    pageNo,
    pageSize
  };
  setTimeout(() => {
    paging.value.complete([]);
    LoadingManager.hide();
  }, 1000);
}
</script>

<style lang="scss" scoped></style>